package com.lyf.alg.practice.huawei.str;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @AUTHOR LYF
 * @DATE 2022/5/26
 * @VERSION 1.0
 * @DESC
 * HJ14:
 */
public class StringSort {

    public static void main(String[] args) {
        String[]strings=new String[3];
        strings[0]="ad";
        strings[1]="cd";
        strings[2]="bd";
        // Comparator
        Arrays.sort(strings, Comparator.naturalOrder());
        for(String str:strings){
            System.out.println(str);
        }
    }
}
